home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{B190576C-254A-11D2-B61E-C80424DEEF17}#51.0#0"; "LCocx.ocx"
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "3D Buttons"
- ClientHeight = 2856
- ClientLeft = 36
- ClientTop = 324
- ClientWidth = 4572
- ClipControls = 0 'False
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 2856
- ScaleWidth = 4572
- StartUpPosition = 2 'CenterScreen
- Begin LCocx98.LCocx LCocx1
- Left = 2040
- Top = 1800
- _ExtentX = 868
- _ExtentY = 656
- End
- Begin VB.PictureBox Picture1
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 3
- Left = 2760
- Picture = "Form1.frx":0000
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 10
- Top = 120
- Width = 384
- End
- Begin VB.PictureBox Picture1
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 2
- Left = 2040
- Picture = "Form1.frx":0442
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 9
- Top = 120
- Width = 384
- End
- Begin VB.PictureBox Picture1
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 1
- Left = 1320
- Picture = "Form1.frx":0884
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 8
- Top = 120
- Width = 384
- End
- Begin VB.PictureBox Picture1
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 0
- Left = 600
- Picture = "Form1.frx":0CC6
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 7
- Top = 120
- Width = 384
- End
- Begin VB.PictureBox Picture3
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 2
- Left = 1080
- Picture = "Form1.frx":1108
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 6
- Top = 1440
- Width = 384
- End
- Begin VB.PictureBox Picture3
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 1
- Left = 1560
- Picture = "Form1.frx":154A
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 5
- Top = 1440
- Width = 384
- End
- Begin VB.PictureBox Picture3
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 0
- Left = 2040
- Picture = "Form1.frx":198C
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 4
- Top = 1440
- Width = 384
- End
- Begin VB.PictureBox Picture3
- AutoRedraw = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 5
- Left = 1560
- Picture = "Form1.frx":1DCE
- ScaleHeight = 384
- ScaleWidth = 972
- TabIndex = 3
- Top = 2160
- Width = 972
- End
- Begin VB.PictureBox Picture3
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ClipControls = 0 'False
- Height = 384
- Index = 4
- Left = 600
- Picture = "Form1.frx":2210
- ScaleHeight = 384
- ScaleWidth = 384
- TabIndex = 2
- Top = 1440
- Width = 384
- End
- Begin VB.TextBox Text1
- Height = 288
- Left = 360
- TabIndex = 0
- Text = "Text1"
- Top = 840
- Width = 1212
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "3D Buttons"
- Height = 192
- Left = 2040
- TabIndex = 1
- Top = 960
- Width = 1992
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- 'For this to work:
- 'Form's Autoredraw = False
- 'Form's ClipControls = False
- 'For every picture(Button) as well
- 'Note that the effect works for picture, and text,
- 'but not for label controls.
- 'For the effect to work you MUST include the 3 events:
- 'MouseMove = "Over", MouseDown = "Down", MouseUp = "Up"
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Form1, "Over")
- End Sub
- Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Label1, "Down")
- End Sub
- Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Label1, "Over", Button)
- End Sub
- Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Label1, "Up")
- End Sub
- Private Sub Picture1_DblClick(Index As Integer)
- Call LCocx1.DButton(Form1, Picture1(Index), "Down")
- End Sub
- Private Sub Picture1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Picture1(Index), "Down")
- End Sub
- Private Sub Picture1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Picture1(Index), "Over", Button)
- End Sub
- Private Sub Picture1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Picture1(Index), "Up")
- Select Case Index
- Case 0 ' pressed first button
- MsgBox "New"
- Call LCocx1.DButton(Form1, Form1, "Over")
- Exit Sub
- Case 1 ' pressed second button
- MsgBox "Open"
- Call LCocx1.DButton(Form1, Form1, "Over")
- Exit Sub
- ' ' You can add more if needed
- End Select
- End Sub
- Private Sub Picture3_DblClick(Index As Integer)
- Call LCocx1.DButton(Form1, Picture3(Index), "Down")
- End Sub
- Private Sub Picture3_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Picture3(Index), "Down")
- End Sub
- Private Sub Picture3_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Picture3(Index), "Over", Button)
- End Sub
- Private Sub Picture3_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Picture3(Index), "Up")
- End Sub
- Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Text1, "Down")
- End Sub
- Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Text1, "Over", Button)
- End Sub
- Private Sub Text1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Call LCocx1.DButton(Form1, Text1, "Up")
- End Sub
-